.screenshot-selector {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  cursor: crosshair;
  user-select: none;
}

.screenshot-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.screenshot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

.selection-area {
  position: absolute;
  border: 2px solid #007bff;
  background: rgba(0, 123, 255, 0.1);
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

.toolbar {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toolbar button {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.toolbar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.toolbar-tip {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
  white-space: nowrap;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-content p {
  margin-top: 20px;
  font-size: 16px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 鼠标样式 */
.screenshot-overlay:hover {
  cursor: crosshair;
}

.selection-area::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

/* 调整手柄样式 */
.resize-handle {
  position: absolute;
  background: #007bff;
  border: 2px solid white;
  border-radius: 50%;
  pointer-events: all;
  z-index: 10001;
  transition: all 0.2s ease;
}

.resize-handle:hover {
  background: #0056b3;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* 不同方向的光标样式 */
.resize-handle-nw,
.resize-handle-se {
  cursor: nw-resize;
}

.resize-handle-ne,
.resize-handle-sw {
  cursor: ne-resize;
}

.resize-handle-n,
.resize-handle-s {
  cursor: ns-resize;
}

.resize-handle-w,
.resize-handle-e {
  cursor: ew-resize;
}

/* 选择区域内的移动光标 */
.selection-area:hover {
  cursor: move;
}

/* 选择区域信息显示 */
.selection-info {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  pointer-events: none;
  z-index: 10002;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .toolbar {
    bottom: 20px;
    left: 20px;
    right: 20px;
    transform: none;
    flex-direction: column;
    gap: 8px;
  }
  
  .toolbar button {
    width: 100%;
  }
  
  .toolbar-tip {
    margin-left: 0;
    text-align: center;
  }
}